package com.spzx.product.service.impl;

import com.spzx.product.api.domain.Brand;
import com.spzx.product.mapper.BrandMapper;
import com.spzx.product.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: IBrandServiceImpl
 * Package: com.spzx.product.service.impl
 * Description:
 *
 * @Author ycy
 * @Create 2024/7/27 15:52
 * @Version 1.0
 */
@Service
public class BrandServiceImpl implements IBrandService {

    @Autowired
    private BrandMapper brandMapper ;

    /**\
     *
     * @param brand 分类品牌
     * @return 分类品牌
     */
    @Override
    public List<Brand> selectBrandList(Brand brand) {
        return brandMapper.selectBrandList(brand);
    }

    @Override
    public Brand selectBrandById(Long id) {
        return brandMapper.selectBrandById(id);
    }

    @Override
    public Integer insertBrand(Brand brand) {
        return brandMapper.insertBrand(brand);
    }

    @Override
    public Integer updateBrand(Brand brand) {
        return brandMapper.updateBrand(brand);
    }

    @Override
    public Integer deleteBrandById(Long[] ids) {
        return brandMapper.deleteBrandById(ids);
    }

    @Override
    public List<Brand> selectBrandAll() {
        return brandMapper.selectBrandList(null);
    }
}
